package com.ljx.blog.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ljx.blog.user.domain.entity.Role;
import com.ljx.blog.user.domain.vo.req.RoleToUserReq;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {
    List<Long> getUserRoleByUserId(Long userId);

    Integer checkUserRoleByCode(@Param("userId") Long userId, @Param("code") String code);

    void insertUserRole(@Param("userId") Long userId, @Param("roleId") Long roleId);

    void deleteUserRole(Long userId);
}
